package edu.pitt.myptm;

public class BeginCommand extends MyCommand {
	public boolean isBeginCommand() {
		return true;
	}
	
	public int getType() {return MyCommand.BEGIN;}
	private boolean emode = false;
	public boolean isTransaction() {
		return emode;
	}
	public void setTransaction() {
		emode = true;
	}
	public void setProcess() {
		emode = false;
	}
	
	public String toString() {
		String s = this.getTransactionId()+":BEGIN";
		if(isTransaction()) {
			s = s + "(Transaction)";
		} else {
			s = s + "(Process)";
		}
		return s;
	}
}
